package cn.doctorpda.conference;

import android.app.Application;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by huangjinlong on 2016/5/12.
 */
public class MyApplication extends Application{

    private static MyApplication instance;

    @Override
    public void onCreate() {
        super.onCreate();
        if (instance == null){
            instance = this;
        }
        JPushInterface.setDebugMode(true); 	// 设置开启日志,发布时请关闭日志
        JPushInterface.init(this);     		// 初始化 JPush
    }
    public static MyApplication getInstance() {
        if (instance == null) {
            throw new NullPointerException("instance is null");
        }
        return instance;
    }
}
